package com.icss.ah.base.service;

import java.util.HashMap;

import org.apache.log4j.Logger;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * 日志记录
 * @author csadchen
 * @date 2016-09-28
 */
@Service
@Transactional
public class FilterLogService {
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;
	private final Logger errlog = Logger.getLogger("E");
	private final Logger infolog = Logger.getLogger("I");
	/**
	 * 保存店铺操作日志
	 * @param hm
	 */
	public void saveOpeLog(HashMap hm){
		try{
			sqlSessionTemplate.insert("FilterLogBean.saveOpeLog", hm);
			infolog.info("FilterLogService|saveOpeLog|true");
		} catch (Exception e) {
			e.printStackTrace();
			errlog.error("FilterLogService|saveOpeLog", e);
		}
		
	}
}
